FROM ubuntu:18.04
LABEL maintainer "wanlingyun <wanlingyun@ztrs.com.cn>"
#shell,rtmp,rtsp,rtsps,http,https,rtp
EXPOSE 1935/tcp
EXPOSE 19350/tcp
EXPOSE 322/tcp
EXPOSE 554/tcp
EXPOSE 80/tcp
EXPOSE 443/tcp
EXPOSE 10000/udp
EXPOSE 10000/tcp
EXPOSE 8000/udp
EXPOSE 8000/tcp
EXPOSE 9000/tcp

RUN apt-get update && \
	DEBIAN_FRONTEND="noninteractive" \
	apt-get install -y --no-install-recommends \
	vim \
	curl \
	libssl-dev \
	libx264-dev \
	libfaac-dev \
	ffmpeg \
	libavcodec-dev libavutil-dev libswscale-dev libresample-dev

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
	&& echo $TZ > /etc/timezone && \
	mkdir -p /opt/media/bin/www && \
	mkdir -p /opt/media/conf

WORKDIR /opt/media/bin/
COPY ./release/linux/Release/MediaServer /opt/media/bin
COPY ./conf/config.ini /opt/media/conf/
ENV PATH /opt/media/bin:$PATH
CMD ["sh","-c","./MediaServer -c ../conf/config.ini"]
